(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0) → true
zero(s(x)) → false
p(0) → 0
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, x, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, x, y) → cons(0, nil)
if1(false, x, y) → cons(0, int(s(0), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
p(s(s(x))) →+ s(p(s(x)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x / s(x)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, x, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, x, y) → cons(0', nil)
if1(false, x, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
S is empty.
Rewrite Strategy: FULL
(5) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
if1/1
(6) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, y) → cons(0', nil)
if1(false, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
S is empty.
Rewrite Strategy: FULL
(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(8) Obligation:
TRS:
Rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, y) → cons(0', nil)
if1(false, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
(9) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
p,
intlist,
int,
if1They will be analysed ascendingly in the following order:
p < int
intlist < int
int = if1
(10) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
p, intlist, int, if1
They will be analysed ascendingly in the following order:
p < int
intlist < int
int = if1
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
p(
gen_0':s5_0(
+(
1,
n7_0))) →
gen_0':s5_0(
n7_0), rt ∈ Ω(1 + n7
0)
Induction Base:
p(gen_0':s5_0(+(1, 0))) →RΩ(1)
0'
Induction Step:
p(gen_0':s5_0(+(1, +(n7_0, 1)))) →RΩ(1)
s(p(s(gen_0':s5_0(n7_0)))) →IH
s(gen_0':s5_0(c8_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
intlist, int, if1
They will be analysed ascendingly in the following order:
intlist < int
int = if1
(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
intlist(
gen_nil:cons4_0(
n312_0)) →
*6_0, rt ∈ Ω(n312
0)
Induction Base:
intlist(gen_nil:cons4_0(0))
Induction Step:
intlist(gen_nil:cons4_0(+(n312_0, 1))) →RΩ(1)
if_intlist(empty(gen_nil:cons4_0(+(n312_0, 1))), gen_nil:cons4_0(+(n312_0, 1))) →RΩ(1)
if_intlist(false, gen_nil:cons4_0(+(1, n312_0))) →RΩ(1)
cons(s(head(gen_nil:cons4_0(+(1, n312_0)))), intlist(tail(gen_nil:cons4_0(+(1, n312_0))))) →RΩ(1)
cons(s(0'), intlist(tail(gen_nil:cons4_0(+(1, n312_0))))) →RΩ(1)
cons(s(0'), intlist(gen_nil:cons4_0(n312_0))) →IH
cons(s(0'), *6_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(15) Complex Obligation (BEST)
(16) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
if1, int
They will be analysed ascendingly in the following order:
int = if1
(17) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if1.
(18) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
int
They will be analysed ascendingly in the following order:
int = if1
(19) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int(
gen_0':s5_0(
+(
1,
n37914_0)),
gen_0':s5_0(
n37914_0)) →
gen_nil:cons4_0(
0), rt ∈ Ω(1 + n37914
0 + n37914
02)
Induction Base:
int(gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
if_int(zero(gen_0':s5_0(+(1, 0))), zero(gen_0':s5_0(0)), gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
if_int(false, zero(gen_0':s5_0(0)), gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
if_int(false, true, gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
if2(true, gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
nil
Induction Step:
int(gen_0':s5_0(+(1, +(n37914_0, 1))), gen_0':s5_0(+(n37914_0, 1))) →RΩ(1)
if_int(zero(gen_0':s5_0(+(1, +(n37914_0, 1)))), zero(gen_0':s5_0(+(n37914_0, 1))), gen_0':s5_0(+(1, +(n37914_0, 1))), gen_0':s5_0(+(n37914_0, 1))) →RΩ(1)
if_int(false, zero(gen_0':s5_0(+(1, n37914_0))), gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
if_int(false, false, gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
if2(false, gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
intlist(int(p(gen_0':s5_0(+(2, n37914_0))), p(gen_0':s5_0(+(1, n37914_0))))) →LΩ(2 + n379140)
intlist(int(gen_0':s5_0(+(1, n37914_0)), p(gen_0':s5_0(+(1, n37914_0))))) →LΩ(1 + n379140)
intlist(int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0))) →IH
intlist(gen_nil:cons4_0(0)) →RΩ(1)
if_intlist(empty(gen_nil:cons4_0(0)), gen_nil:cons4_0(0)) →RΩ(1)
if_intlist(true, gen_nil:cons4_0(0)) →RΩ(1)
nil
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
(20) Complex Obligation (BEST)
(21) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
if1
They will be analysed ascendingly in the following order:
int = if1
(22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if1.
(23) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
(25) BOUNDS(n^2, INF)
(26) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
(28) BOUNDS(n^2, INF)
(29) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
(31) BOUNDS(n^1, INF)
(32) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
(34) BOUNDS(n^1, INF)